import { createRouter, createWebHistory, RouteRecordRaw, createWebHashHistory } from 'vue-router'
import Layout from '@/components/Footer/Footer.vue'
export const routes: Array<RouteRecordRaw> = [
	{
		path: '/',
		component: Layout,
		redirect: '/loading',

		children: [
			{
				path: '/home',
				name: 'home',
				meta: {
					navShow: false,
					tabShow: false,
					keepAlive: false,
					isfull: 0,
					hasBack:"0",
					hasLogo:"1",
					title:'微团购'
				},
				component: () => import('@/views/home/home.vue')
			},
			{
				path: '/order',
				name: 'order',
				meta: {
					navShow: false,
					tabShow: false,
					title: '订单',
					keepAlive: false,
					isfull: 0,
					hasBack:"0",
					hasLogo:"0"
				},
				component: () => import('@/views/order/order.vue')
			},
			{
				path: '/car',
				name: 'car',
				meta: {
					navShow: false,
					tabShow: false,
					title: '购物车',
					keepAlive: false,
					isfull: 0,
					hasLogo:"0",
					hasBack:"0"
				},
				component: () => import('@/views/car/car.vue')
			},
			{
				path: '/center',
				name: 'center',
				meta: {
					navShow: false,
					tabShow: false,
					title: '我的',
					keepAlive: false,
					isfull: 0,
					hasLogo:"0",
					hasBack:"0"
				},
				component: () => import('@/views/center/center.vue')
			},
			{
				path: '/add',
				name: 'addstart',
				meta: {
					navShow: false,
					tabShow: false,
					title:'一键开团',
					keepAlive: false,
					isfull: 0,
					hasLogo:"1",
					hasBack:"0"
				},
				component: () => import('@/views/addstart/addstart.vue')
			}
		]
	},
	{
		path: '/loading',
		name: 'loading',
		component: () => import('@/views/loading/loading.vue'),
		meta: {
			title:'微团购',
			hasLogo:"0",
			hasBack:"0"
		}
	},
	{
		path: '/home/groupLink',
		name: 'groupLink',
		component: () => import('@/views/home/groupLink/GroupLink.vue'),
		meta: {
			title:'微团购',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/home/commander',
		name: 'commander',
		component: () => import('@/views/home/commander/CommanderDetail.vue'),
		meta: {
			title:'微团购',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/home/payOrder',
		name: 'payOrder',
		component: () => import('@/views/home/payOrder/payOrder.vue'),
		meta: {
			title: '跟团购买',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/spec/specSet',
		name: 'specSet',
		meta: {
			navShow: false,
			tabShow: false,
			title: '设置规格',
			keepAlive: true,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/spec/specSet.vue')
	},
	{
		path: '/spec/addNewSpecCard',
		name: 'addNewSpecCard',
		component: () => import('@/views/spec/addNewSpecCard.vue'),
		meta: {
			title: '编辑规格 ',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/spec/specManage',
		name: 'specManage',
		component: () => import('@/views/spec/specManage.vue'),
		meta: {
			title: '管理规格 ',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/home/address/choseAdress',
		name: 'choseAdress',
		component: () => import('@/views/home/address/choseAdress.vue')
	},

	{
		path: '/address',
		name: 'address',
		meta: {
			navShow: false,
			tabShow: false,
			title: '收货地址',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/address/address.vue')
	},
	{
		path: '/setting',
		name: 'setting',
		meta: {
			navShow: false,
			tabShow: false,
			title: '设置',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/setting/setting.vue')
	},
	{
		path: '/tuansetting',
		name: 'tuansetting',
		meta: {
			navShow: false,
			tabShow: false,
			title: '团长设置',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/setting/index.vue')
	},
	{
		path: '/feedbackinfo',
		name: 'feedbackinfo',
		meta: {
			navShow: false,
			tabShow: false,
			title: '反馈与投诉',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/feedback/feedbackinfo.vue')
	},

	{
		path: '/grouponmanage',
		name: 'grouponmanage',
		meta: {
			navShow: false,
			tabShow: false,
			title: '团购管理',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/manage/grouponManage.vue')
	},
	{
		path: '/ordermanage',
		name: 'ordermanage',
		meta: {
			navShow: false,
			tabShow: false,
			title: '订单管理',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/manage/orderManage.vue')
	},
	{
		path: '/ordermanageinfo',
		name: 'ordermanageinfo',
		meta: {
			navShow: false,
			tabShow: false,
			title: '订单详情',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/manage/orderManageinfo.vue')
	},
	{
		path: '/addressmanage',
		name: 'addressmanage',
		meta: {
			navShow: false,
			tabShow: false,
			title: '自提点管理',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/manage/addressManage.vue')
	},
	{
		path: '/community',
		name: 'community',
		meta: {
			navShow: false,
			tabShow: false,
			title: '创建小区团购',
			keepAlive: true,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/addstart/add-community/community.vue')
	},
	{
		path: '/ordinary',
		name: 'ordinary',
		meta: {
			navShow: false,
			tabShow: false,
			title: '创建普通团购',
			keepAlive: true,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/addstart/add-ordinary/ordinary.vue')
	},
	{
		path: '/logistics',
		meta: {
			navShow: false,
			tabShow: false,
			title: '物流方式',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () =>
			import('@/views/addstart/components/logistics/logistics.vue')
	},
	{
		path: '/logisticslist',
		name: 'logisticslist',
		meta: {
			navShow: false,
			tabShow: false,
			title: '选择自提点',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () =>
			import('@/views/addstart/components/logistics/logistic-list.vue')
	},
	{
		path: '/productdesc',
		name: 'productdesc',
		meta: {
			navShow: false,
			tabShow: false,
			title: '商品描述',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () =>
			import('@/views/addstart/components/products/product-desc.vue')
	},
	{
		path: '/logistics/:order_id',
		name: 'logistics',
		meta: {
			navShow: false,
			tabShow: false,
			title: '快递信息',
			keepAlive: false,
			isfull: 0,
			hasLogo:"0",
			hasBack:"1"
		},
		component: () => import('@/views/logistics/logistics.vue')
	},
	{
		path: '/refound',
		name: 'refound',
		component: () => import('@/views/refound/Refound.vue'),
		meta: {
			title: '申请退款',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/memberRefound',
		name: 'memberRefound',
		component: () => import('@/views/refound/MemberRefound.vue'),
		meta: {
			title: '申请退款',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/privacy',
		name: 'privacy',
		component: () => import('@/views/privacy/Privacy.vue'),
		meta: {
			title: '隐私协议',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/salesDetails',
		name: 'salesDetails',
		component: () => import('@/views/salesDetails/SalesDetails.vue'),
		meta: {
			title: '售后详情',
			hasLogo:"0",
			hasBack:"1"
		}
	},
	{
		path: '/:pathMatch(.*)*',
		component: () => import('@/views/404/notFound.vue')
	}
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
